package com.photoeditor.demo.model.bean.stash;

import android.content.Context;

import com.common.base.ComponentContext;
import com.photoeditor.R;
import com.photoeditor.demo.model.image.emoji.StickerApkResource;
import com.photoeditor.demo.model.image.emoji.StickerConstant;

/**
 * Created by Administrator on 2017/7/4 0004.
 */

public class ARStickerResource extends StickerApkResource {

    /**
     * 默认的 Emoji 列表的id
     */
    private int[] mEmojiIds;

    public ARStickerResource(Context context, int iconRes) {
        super(context.getPackageName(), context.getResources());
        init(context, iconRes);
    }

    @Override
    public void init(Context context, int iconRes) {
        isExist = true;
        //下面都是默认值
        mEmojiNames = mRes.getStringArray(R.array.sticker_ar_name);

        mEmojiIds = new int[] {
                -1, -1,
                -1, -1,
                -1
        };
        setInit(true);
        setName(StickerConstant.APK_EMOJI_NAME);

        mEmojiColNum = StickerConstant.STASH_COL_NUM_AR;
        mEmojiPageNum = StickerConstant.STASH_PAGE_EMOJI_NUM_AR;
        mVerticalSpacing = mRes.getDimensionPixelSize(R.dimen.sticker_ar_item_margin);
        mEmojiWidth = mRes.getDimensionPixelSize(R.dimen.sticker_ar_default_size);
        mEmojiHeight = mEmojiWidth;
        mItemWidth = mRes.getDimensionPixelSize(R.dimen.sticker_ar_default_button_size);
        mItemHeight = mItemWidth;
        mPageHeight = mRes.getDimensionPixelSize(R.dimen.sticker_ar_grid_height);
        mEditEmojiWidth = mRes.getDimensionPixelSize(R.dimen.sticker_ar_edit_default_size);
        mEditEmojiHeight = mRes.getDimensionPixelSize(R.dimen.sticker_ar_edit_default_size);
        mNeedBuy = false;
        mAlreadyBuy = false;
        mStickerIconId = iconRes;
        setBgColor(ComponentContext.getContext().getResources().getColor(R.color.emoji_pannel_default_background_color));
    }

    public int[] getEmojiIds() {
        return mEmojiIds;
    }

    public void setEmojiIds(int[] mEmojiIds) {
        this.mEmojiIds = mEmojiIds;
    }
}
